function [ gibbs_energy ] = wlc_gibbs_energy( force,unfolding_start,unfolding_size,A )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
    contour_length= (unfolding_start+unfolding_size)./zz_wlc(force.*A./4);
    unfoldingstart_force=(0.25.*(1-unfolding_start./contour_length).^-2-0.25+unfolding_start./contour_length).*4./A;
    gibbs_energy=integral(@wlc_length,unfoldingstart_force,force);
    function [extension]= wlc_length(x) 
        extension=contour_length.*zz_wlc(x.*A./4);
    end

end

